cmake_minimum_required(VERSION 3.0)

project(CALC)

set(CMAKE_CXX_STANDARD 11)# 指定C++ 11标准
set(CMAKE_AR  D:/work/msys2/mingw64/bin/ar.exe)
set(CMAKE_C_COMPILER  D:/work/msys2/mingw64/bin/gcc.exe)
set(CMAKE_CXX_COMPILER  D:/work/msys2/mingw64/bin/g++.exe)

file(GLOB SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
set(EXECUTABULE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR} )
include_directories(${PROJECT_SOURCE_DIR}/include) # 添加库文件目录
# link_directories(${PROJECT_SOURCE_DIR}/lib1) # 关联链接库文件夹
# link_libraries(calc) # 指定静库，也可用calc（失败）
set(CALLIB ${PROJECT_SOURCE_DIR}/lib1)

add_executable(app ${SRC})
target_link_libraries(app ${CALLIB}/libcalc.dll)
# target_link_libraries(app ${CALLIB}/libcalc1.a)
